<?php
/**
 * @author lebachvu
 * @copyright 2012
 * 
 * Topic: Create a Login Form 
 * allow user login on system. check type user, check permission and view this permission
 * 
 * 1. Create Login Form.
 * 2. Create class Login check information whom user submit login.
 * 3. Create connect and check permission, after that declare SESSION or COOKIE for user option.   
 */    
?>
<!DOCTYPE HTML>
<html>
<head>
	<meta http-equiv="content-type" content="text/html" />
	<meta name="author" content="lebachvu" />
	<title>Login Page</title>
</head>

<body>
    <?php      
            
        if(isset($_COOKIE['uName']))
        {
            header("location: Homepage.php");
        } 
        else
        {
    ?>    
    <form name="login" action="homepage.php" method="post">
        User name: <input name="username" type="text"/>
        <br/>Pass word: <input name="password" type="password"/>
        <br/>Save Password <input name="isSave" type="checkbox" />
        <br/><input type="submit" value="Login"/>         
    </form>
    <?php
        }                
    ?>
</body>
</html>